import { getColumnsData } from "../common";

const agreementListTable = [
  {
    crux_key: "privacy_policy", // 关键词
    title: "隐私协议", // 标题
    sort: 1, // 排序
    content: "" // 内容
  }
];

const headerList = [
  {
    width: "100px",
    label: "编号",
    prop: "id",
    sortable: true
  },
  {
    width: "auto",
    label: "关键词",
    prop: "crux_key"
  },
  {
    width: "auto",
    label: "标题",
    prop: "title"
  },
  {
    width: "auto",
    label: "排序",
    prop: "sort"
  },
  {
    label: "操作",
    width: "180px",
    hideCheck: true,
    fixed: "right",
    showValue: [
      {
        class: "",
        key: "编辑",
        cellType: "button",
        type: "primary", // 按钮类型
        buttonType: "edit",
        tableType: "agreementList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      },
      {
        class: "",
        key: "删除",
        cellType: "button",
        type: "danger", // 按钮类型
        buttonType: "delete",
        tableType: "agreementList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      }
    ]
  }
];

const agreementListColumns = [];

getColumnsData("agreementList", agreementListColumns, headerList, res => {
  console.log("agreementList", res);
});
export { agreementListTable, agreementListColumns };
